package com.hitqz.robot.biz.controller;

import com.hitqz.robot.biz.core.FileProperties;
import com.hitqz.robot.camera.EquipmentFactory;
import com.hitqz.robot.camera.configure.EquipmentCmdEnum;
import com.hitqz.robot.camera.dto.TakePicParamsDto;
import com.hitqz.robot.common.core.util.R;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping(value = "camera")
@RequiredArgsConstructor
@Tag(name = "相机测试")
public class CameraTestController {

    private final EquipmentFactory factory;
    private final FileProperties fileProperties;

    private final String ip = "192.168.100.165";
    private final String userName = "admin";
    private final String password = "hbyt137258";
    private final Integer port = 8000;
    /**
     * 抓图
     *
     * @return
     */
//    @GetMapping(value = "takePic")
//    public R takePic() {
//        //return R.ok(factory.HK().takePic(ip, null,fileProperties.getLocal().getBasePath(),"test"+ File.separator+"pic"));
//        TakePicParamsDto paramsDto = new TakePicParamsDto();
//        paramsDto.setBasePath("das");
//        factory.HK().executeCmd(null,  false, EquipmentCmdEnum.TAKE_PIC, paramsDto);
//        return R.ok();
//    }


}
